package psd.model.Prolog.Converters;

import org.eclipse.jdt.core.dom.WhileStatement;

import psd.model.IConverter;
import psd.model.Prolog.FactGenerationToolbox;
import psd.model.Prolog.PrologConverter;


public class PrologWhileStatementConverter extends PrologConverter implements
		IConverter<WhileStatement> {

	public PrologWhileStatementConverter(FactGenerationToolbox toolbox) {
		super(toolbox);
	}

	@Override
	public boolean convert(WhileStatement node) {
		String args[] = { idResolver.getID(node.getExpression()),
				idResolver.getID(node.getBody()), this.getFilePath(node), this.getLineNumber(node) };
		createBodyFact(node, "whileT", args);
		return true;
	}

}
